package com.yicun.road.service.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yicun.road.service.mapper.TShapesMapper;
import com.yicun.road.service.pojo.disease.TShapes;
import com.yicun.road.service.service.TShapesService;
import com.yicun.road.service.util.PageUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author liushan
 * @since 2022-06-14
 */
@Service
public class TShapesServiceImpl extends ServiceImpl<TShapesMapper, TShapes> implements TShapesService {

    @Resource
    private TShapesMapper tShapesMapper;
    @Resource
    private PageUtil pageUtil;

    @Override
    public Page<TShapes> queryTShapesList(TShapes tShapes) {
        return tShapesMapper.queryTShapesList(pageUtil.defaultPage(tShapes.getCurrPage(), tShapes.getPageSize()), tShapes);
    }

    @Override
    public Object saveTShapes(TShapes tShapes) {
        return tShapesMapper.insert(tShapes);
    }

    @Override
    public void updateTShapes(TShapes tShapes) {
        tShapesMapper.updateById(tShapes);
    }

    @Override
    public void deleteTShapes(Integer id) {
        tShapesMapper.deleteById(id);
    }
}
